<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="main" style="width: 600px;height:400px;"></div>

    <script src="../assets/lib/echarts/echarts.min.js"></script>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        const myChart = echarts.init(document.querySelector('#main'));

        // 指定图表的配置项和数据
        const option = {
            color:['red','black'],
            title: {
                text: '薪资 Salary'
            },
            
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: ['期望薪资', '实际薪资']
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    name: '期望薪资',
                    symbol: 'circle',
                    type: 'line',
                    // stack: 'Total',
                    // smooth: true,
                    symbol: 'none',
           
                    data: [120, 132, 101, 134, 90, 230, 210]
                },
                {
                    name: '实际薪资',
                    symbol: 'circle',
                    type: 'line',
                    // smooth: true,
                    // stack: 'Total',
                    symbol: 'none',
                    data: [220, 182, 191, 234, 290, 330, 310]
                }
            ]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
</body>

</html>